// @ts-ignore
/* eslint-disable */
import request from '@/services/request';

/** 列表查询 GET /v1/admin/evaluations */
export async function evaluationV1AdminControllerIndex(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.EvaluationV1AdminControllerIndexParams,
  options?: { [key: string]: any },
) {
  return request<{ total: number; list: API.EvaluationAdminIndexResult[] }>(
    '/v1/admin/evaluations',
    {
      method: 'GET',
      params: {
        // pageIndex has a default value: 1
        pageIndex: '1',
        // pageSize has a default value: 10
        pageSize: '10',

        ...params,
      },
      ...(options || {}),
    },
  );
}

/** 新增评测文章 POST /v1/admin/evaluations */
export async function evaluationV1AdminControllerCreateEvaluationArticle(
  body: API.EvaluationAdminCreateDto,
  options?: { [key: string]: any },
) {
  return request<any>('/v1/admin/evaluations', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 编辑评测文章 PATCH /v1/admin/evaluations/${param0} */
export async function evaluationV1AdminControllerUpdateEvaluationArticle(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.EvaluationV1AdminControllerUpdateEvaluationArticleParams,
  body: API.EvaluationAdminUpdateDto,
  options?: { [key: string]: any },
) {
  const { uuid: param0, ...queryParams } = params;
  return request<any>(`/v1/admin/evaluations/${param0}`, {
    method: 'PATCH',
    headers: {
      'Content-Type': 'application/json',
    },
    params: { ...queryParams },
    data: body,
    ...(options || {}),
  });
}

/** 详情 GET /v1/admin/evaluations/evaluation/${param0} */
export async function evaluationV1AdminControllerShowEvaluation(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.EvaluationV1AdminControllerShowEvaluationParams,
  options?: { [key: string]: any },
) {
  const { uuid: param0, ...queryParams } = params;
  return request<API.EvaluationAdminShowResult>(`/v1/admin/evaluations/evaluation/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 导出频响数据 GET /v1/admin/evaluations/export-raw-fr-data */
export async function evaluationV1AdminControllerExportRawFrData(options?: { [key: string]: any }) {
  return request<any>('/v1/admin/evaluations/export-raw-fr-data', {
    method: 'GET',
    ...(options || {}),
  });
}
